﻿using System;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.Serialization;

namespace JTLeigh.Commerce.Spencer.Features.ProductImages.Service.Contracts.Runtime.GetProductImageSnapshot
{

	/// <summary>
	/// Data contract representing a single image for a single product, view, and size combination.
	/// </summary>
    [DataContract(Name = "ProductImageSnapshot", Namespace = "http://schemas.jtleigh.com/Commerce/Spencer/Features/ProductImages/1.0/Runtime/GetProductImageSnapshot/")]
    public class ProductImageSnapshot
	{

		/// <summary>
		/// Gets or sets the alternative text that should be displayed in place of the image.
		/// </summary>
		[DataMember(Name = "AlternativeText", IsRequired = false)]
		public string AlternativeText { get; set; }

		/// <summary>
		/// Gets or sets the usage permission text that should be attached to the image.
		/// </summary>
		[DataMember(Name = "UsagePermissionText", IsRequired = false)]
		public string UsagePermissionText { get; set; }

		/// <summary>
		/// Gets or sets the width of the image.
		/// </summary>
		/// <value>An <see cref="Int16"/> pixel width.</value>
		[DataMember(Name = "Width", IsRequired = true)]
		public short Width { get; set; }

		/// <summary>
		/// Gets or sets the height of the image.
		/// </summary>
		/// <value>An <see cref="Int16"/> pixel height.</value>
		[DataMember(Name = "Height", IsRequired = true)]
		public short Height { get; set; }

		/// <summary>
		/// Gets or sets the path to the image.
		/// </summary>
        /// <remarks>
        /// <para>
        /// All paths returned from services must be relative and should be mapped to 
        /// channel-specific relative or absolute paths in each channel.
        /// </para>
        /// </remarks>
        [DataMember(Name = "Path", IsRequired = true)]
		public string Path { get; set; }

		/// <summary>
		/// Gets or sets the number of other sizes of the specified view of the image.
		/// </summary>
		[DataMember(Name = "OtherSizes", IsRequired = true)]
		public int OtherSizes { get; set; }

		/// <summary>
		/// Gets or sets the number of other views of the image.
		/// </summary>
		[DataMember(Name = "OtherImages", IsRequired = true)]
		public int OtherImages { get; set; }

	}

}
